﻿#ifndef _DB_IDATAMETAINFOS_H
#define _DB_IDATAMETAINFOS_H

#include "udatabase/interface/idatametainfo.h"
#include "udatabase/dll_cfg.h"
#include "kernel/Referenced.h"

namespace FD
{
	namespace Utility
	{
		namespace DB
		{
			namespace Interface
			{
				/// <summary>
				/// 数据集元信息集合接口，用于记录数据集的相关信息
				/// </summary>
				class FD_DB_Export IDataMetaInfos : public FD::Kernel::CReferenced
				{
				public:		
					/// <summary>
					/// 默认析构函数
					/// </summary>
					/// <param name=""></param>
					/// <returns></returns>
					virtual ~IDataMetaInfos();
				public:
					/// <summary>
					/// 获取元信息数目
					/// </summary>
					/// <returns>数据集元信息的数目</returns>
					virtual UINT32 getCount() const;
					/// <summary>
					/// 获取指定索引的数据集元信息
					/// </summary>
					/// <param name="index">指定索引</param>
					/// <returns>按照指定索引范围对象，如果索引超出范围，则抛出异常</returns>
					virtual FD::Utility::DB::Interface::IDataMetaInfo* getInfo(UINT32 index) const;

					/// <summary>
					/// 添加指定数据集元信息
					/// </summary>
					/// <param name="info">数据集元信息对象</param>
					/// <returns>添加后的索引</returns>
					virtual UINT32 add(const FD::Utility::DB::Interface::IDataMetaInfo* ref_info);
					/// <summary>
					/// 移除指定索引的对象
					/// </summary>
					/// <param name="index">指定索引</param>
					/// <returns></returns>
					virtual UINT32 remove(UINT32 index);
					/// <summary>
					/// 清楚所有对象
					/// </summary>
					/// <returns>清除对象的个数</returns>
					virtual UINT32 clear();

				protected:
					/// <summary>
					/// 默认构造函数
					/// </summary>
					/// <returns></returns>
					IDataMetaInfos();
				private:
					C_DISABLE_COPY(IDataMetaInfos);
				};
			}
		}
	}
}

#endif
